﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;

namespace CTEA_INDIA
{
    public partial class Feedback : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            BAL.conn.connectionString = ConfigurationManager.ConnectionStrings["CTEA"].ConnectionString;
            if (Session["UserId"] == null || Session["UserId"].ToString() == "")
            {
                Session.Abandon();
                Session.RemoveAll();
                Response.Redirect("Default.aspx");
            }
        }
         protected void btnSubmit_Click(object sender, EventArgs e)
        {

            if (Page.IsValid)
            {
                int feedbackTypeID = Convert .ToInt32 ( ddlFeedBackType.SelectedValue);

                string Name = txtName.Text;
                string EmailID = txtEmailId.Text;
                string mobileno = txtPers_MobileNo.Text;
                string message = txtMessage.Text;

                BAL.Customers.InsertFeedback(feedbackTypeID , Name, EmailID, mobileno, message);
            }
         }
    }
}